
import os
import yaml
from configs.settings import DATA_DIR
from libraries.logger import log


def read_yml(filename) -> list or dict:
    """读取yaml文件数据"""
    with open(os.path.join(DATA_DIR, filename), encoding='utf-8') as fs:
        data = yaml.load(fs, Loader=yaml.FullLoader)
        log.debug(f"读取到测试文件<{filename}>数据：\n{data}")
    return data
